<template lang="">
  <div class="content">
    <div class="main">
    <el-tabs v-model="activeName" >
      <el-tab-pane label="首页" name="first" >
        <common-index></common-index>
      </el-tab-pane>
      <el-tab-pane label="消息提示" name="second" >
        <common-top></common-top>
      </el-tab-pane>
      <el-tab-pane label="图表汇总" name="third">
        <common-census></common-census>
      </el-tab-pane>
    </el-tabs>
  </div>
   
  </div>
</template>
<script>
  import moment from 'moment'
  import CommonCensus from '@/components/CommonCensus.vue'
  import CommonTop from '@/components/CommonTop.vue'
  import CommonIndex from '@/components/CommonIndex.vue'
  export default {
    components: { CommonCensus,CommonTop,CommonIndex},
    data() {
      return {
        activeName: 'first',
        current: 0,
        size: 100,
        List: [],
        List1: [],
        List2: [],
        List3: [],
        newsId: '',
        followId: '',
        reimburseId: '',
        contractId: '',

      }
    },
    mounted() {
      this.getContractList()
      this.getApplyList()
      this.getProcedureList()
      this.getNewsList()
    },
    methods: {
      moment,
      // 获取合同列表
      async getContractList() {
        // 解构出参数
        const { current, size } = this;
        var data = {
          current: current,
          size: 10,
        }
        let result = await this.$API.agreement.reqSchedule(data)
        this.total = result.data.total;
        this.List = result.data.data
      },
      // 报销列表查询
      async getApplyList() {
        // 解构出参数
        const { current, size } = this;
        var data = {
          current: current,
          size: 10,

          // reimburseId:reimburseId
        }
        let result = await this.$API.apply.reqApplyList(data);
        // console.log(result)
        this.total = result.data.total;
        this.List1 = result.data.data
      },
      //跟进过程查询
      async getProcedureList() {
        // 解构出参数
        const { current, size } = this;
        // 获取资源列表接口
        var data = {
          current: current,
          size: 10,
        }
        let result = await this.$API.change.reqProcedureList(data);
        if (result.data.code === 200) {
          this.total = result.data.total;
          this.List2 = result.data.data;
        } else {
          alert(result.data.message)
        }

      },
      //消息查询
      async getNewsList() {
        // 解构出参数
        const { current, size } = this;

        var data = {
          current: current,
          size: 10,
        }
        let result = await this.$API.news.reqNewsList(data);
        if (result.data.code === 200) {
          this.total = result.data.total;
          this.List3 = result.data.data;
        } else {
          alert(result.data.message)
        }

      },
    }

  }
</script>
<style>
  /* @import "../../../style/style.css"; */
  .bt{
    font-size: 16px;
  }
  .nr{
    color: #888;
    font-size: 14px;
  }
  
 
</style>